from PyQt6.QtWidgets import QWidget
from PyQt6.QtGui import QColor,QFont
from PyQt6.QtCore import Qt

__QSS = """
* {
    font-family: "Microsoft YaHei";
    font-size: 14pt;
}

QScrollArea {
    border: 0 solid;
}

QLabel#gamestatus-label {
    qproperty-alignment:AlignCenter;
    background-color: #666666;
    color: #cccccc;
    font-weight: bold;
}

QLabel#gamestatus-text {
    qproperty-alignment:AlignCenter;
    background-color: #555555;
    color: #bbbbbb;
    font-size: 12pt;
}

QLabel#img-check-satart {
    qproperty-alignment:AlignCenter;
    background-color: #555555;
    color: #dddddd;
    font-weight: bold;
}

QPushButton#img-check-start {
    background-color: #555555;
    color: #dddddd;
}
QPushButton#img-check-start:hover {
    color: #eeeeee;
    font-weight: bold;
}

QLabel#img-check-status {
    qproperty-alignment:AlignCenter;
    background-color: #3030aa;
    color: #dddddd;
    font-weight: bold;
}

QPushButton#img-dialog-result-remove {
    background-color: #555555;
    color: #dddddd;
}
QPushButton#img-dialog-result-remove:hover {
    color: #eeeeee;
    font-weight: bold;
}

"""

# __COLOR = {
#     "gamecanvas-bg": Qt.GlobalColor.darkGray,
#     "gameboard-bg": QColor(255,180,91),
#     "gameboard-coord": QColor(17,17,17),
#     "gameboard-star": QColor(32,32,32),
#     "gamepiece-black-border": QColor(10,10,10),
#     "gamepiece-black-bg": Qt.GlobalColor.black,
#     "gamepiece-white-border": QColor(10,10,10),
#     "gamepiece-white-bg": Qt.GlobalColor.white,
#     "gamestep-black": QColor(238,238,238),
#     "gamestep-white": QColor(17,17,17),
# }

# __FONT = {
#     "gameboard-coord": QFont("Courier New", 12),
#     "gamestep": QFont("Arial", 14),
# }

# def uxtheme_color(id:str) -> QColor:
#     return __COLOR.get(id, Qt.GlobalColor.black)

# def uxtheme_font(id:str) -> QFont:
#     return __FONT.get(id, QFont())

def uxtheme_use(window:QWidget, id:str="default") -> None:
    window.setStyleSheet(__QSS)
